package com.yehun.service;

import com.yehun.entity.PagerEntity;
import com.yehun.entity.User;
import com.yehun.exception.ErrorException;

import java.util.List;

public interface UserService {

    List<User> list();

    PagerEntity<User> listPager(int pageIndex, int pageSize);

    User get(int id);

    User getByUserId(String userId);

    User getByEmail(String email);

    int save(User user) throws ErrorException;

    int updatePermission(String userId, int roleId, Long permission) throws ErrorException;

    int remove(Integer[] idArray) throws ErrorException;
}
